//
//  YPRegistOneTableViewCell.m
//  ChengHuiTong
//
//  Created by KiVen on 15/12/2.
//  Copyright © 2015年 张文权. All rights reserved.
//

#import "YPRegistOneTableViewCell.h"

@implementation YPRegistOneTableViewCell{
    
    NSString*_reuseIdentifier;

}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self != nil) {
        
        _reuseIdentifier=reuseIdentifier;
       self.selectionStyle = UITableViewCellSelectionStyleNone;
        if ([reuseIdentifier isEqualToString:@"cell1"]) {
        
            _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, 80, 40)];
//            _titleLabel.backgroundColor = [UIColor orangeColor];
            _titleLabel.text = @"用户名";
            [self addSubview:_titleLabel];
            
            _titleLabel.font=[UIFont systemFontOfSize:14];
            
            _contentTextField = [[UITextField alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_titleLabel.frame), 0, SCREEN_WIDTH-20-20-80, 40)];
            
            _contentTextField.font=[UIFont systemFontOfSize:14];
//            _contentTextField.backgroundColor = [UIColor greenColor];
            [self addSubview:_contentTextField];
        }else if ([reuseIdentifier isEqualToString:@"cell0"]){
            
            
            _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, 80, 40)];
//            _titleLabel.backgroundColor = [UIColor orangeColor];
            _titleLabel.text = @"用户名";
            [self addSubview:_titleLabel];
            
            _titleLabel.font=[UIFont systemFontOfSize:14];
            
            _contentTextField = [[UITextField alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_titleLabel.frame), 0, SCREEN_WIDTH-20-20-80-100-10, 40)];
            
            _contentTextField.font=[UIFont systemFontOfSize:14];;
//            _contentTextField.backgroundColor = [UIColor greenColor];
            [self addSubview:_contentTextField];

            
            _getCodeButton = [UIButton buttonWithType:UIButtonTypeCustom];
            
            _getCodeButton.frame = CGRectMake(SCREEN_WIDTH-15-100,5 , 100, 30);
            
            _getCodeButton.titleLabel.font=[UIFont systemFontOfSize:14];
            
            _getCodeButton.layer.cornerRadius =3;
            _getCodeButton.clipsToBounds = YES;
            _getCodeButton.layer.borderColor = kColor_AppNavColor.CGColor;
            _getCodeButton.layer.borderWidth =1;
            [_getCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
            [_getCodeButton setTitleColor:kColor_AppNavColor forState:UIControlStateNormal];
            [self addSubview:_getCodeButton];
        }


    
    }
    return self;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
